package com.rc.evcharger.mapper.order;

import com.rc.evcharger.common.base.BaseMapper;
import com.rc.evcharger.model.order.OrderInfo;
import com.rc.evcharger.model.order.OrderInfoExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface OrderInfoMapper extends BaseMapper<Long, OrderInfo, OrderInfoExample> {
    int countElecOrder(@Param("memberId") Long memberId,
                       @Param("tenantCode") String tenantCode, @Param("startTime") Date startTime);

    //OrderInfo selectByOrderNum(@Param("orderNum") String orderNum);

    OrderInfo selectNewOrderByMemberIdAndGunId(@Param("memberId") Long memberId, @Param("gunId") Long gunId);

    OrderInfo selectNewOrderByMemberId(@Param("memberId") Long memberId);

    OrderInfo selectByPileIdAndGunId(@Param("elecPileId") Long elecPileId, @Param("gunId") Long gunId);

    OrderInfo selecOccupytByPileIdAndGunId(@Param("elecPileId") Long elecPileId, @Param("gunId") Long gunId);

    Long countByChargeType(@Param("accountType") String accountType, @Param("memberInfos") List<Long> memberInfos);

    List<OrderInfo> listDdByDateAndMemberId(@Param("date") String date, @Param("memberId") Long memberId);

    List<OrderInfo> listExceptionOrderInfoKy();

    List<OrderInfo> listNotFinishedOrder(@Param("startTime") Date startTime, @Param("endTime") Date endTime);

    OrderInfo selectLikeOrderNum(@Param("orderNum")String orderNum);

    OrderInfo selectForceMasterOrderNum(@Param("orderNum")String orderNum);

    List<OrderInfo> queryExcetptionOrderInfo();

    int insertSelectiveBackOrderId(OrderInfo orderInfo);



}